package test3_25.demo05;

public class Homework14_7_PartialInversion {

    public static void inversion(String s, int start, int end){
        StringBuilder sb = new StringBuilder(s);
        String newStr = sb.substring(start,end);
        StringBuilder sb1 = new StringBuilder(newStr);
        sb1.reverse();
        sb.replace(start,end,sb1.toString());
        System.out.println(sb);
    }

    public static void main(String[] args) {
        Homework14_7_PartialInversion.inversion("abcdefgeee",3,6);
    }
}
